package com.hu.bgp.framework.linker;

import com.google.gwt.core.ext.LinkerContext;
import com.google.gwt.core.ext.TreeLogger;
import com.google.gwt.core.ext.UnableToCompleteException;
import com.google.gwt.core.ext.linker.AbstractLinker;
import com.google.gwt.core.ext.linker.ArtifactSet;
import com.google.gwt.core.ext.linker.LinkerOrder;
import com.google.gwt.core.ext.linker.LinkerOrder.Order;
import com.google.gwt.core.ext.linker.impl.SelectionScriptLinker;
import com.google.gwt.core.linker.XSLinker;

@LinkerOrder(Order.PRIMARY)
public class BgpGameLinker extends XSLinker{

	@Override
	public String getDescription() {
		// TODO Auto-generated method stub
		return "My BGP Linker ";
	}

	@Override
	protected String getCompilationExtension(TreeLogger logger,
			LinkerContext context) throws UnableToCompleteException {
		// TODO Auto-generated method stub
		return ".cache.js";
	}


	@Override
	protected String getModuleSuffix(TreeLogger logger, LinkerContext context)
			throws UnableToCompleteException {
		// TODO Auto-generated method stub
		return "if(bgpGameLinker.load)bgpGameLinker.load.onScriptLoad(gwtOnLoad);})();";
	}

	@Override
	protected String getSelectionScriptTemplate(TreeLogger logger,
			LinkerContext context) throws UnableToCompleteException {
		// TODO Auto-generated method stub	
		return "com/hu/bgp/framework/linker/BgpSelection.js";
	}

}
